use ztask::task::*;

fn main() {
    let task_group = Sequence::new(
        vec![
            Log::new("H") as Box<dyn ITask>,
            Log::new("e"),
            Log::new("l"),
            Log::new("l"),
            Log::new("o"),
        ]
    );

    let mut lock = Lock::new(
        Intermittent::new(3),
        task_group,
    );

    let mut i = 0;

    while !lock.is_finished() {
        println!("Before {} calls", i);
        lock.step();

        i += 1;
    }
}